/*
 * @Description: 首页 - 广告
 * @Date: 2021-03-12 09:45:48
 * @Author: 黄治恩
 */

import React, { Component } from 'react';
import { Image } from 'antd'

import './style.scss'

interface Props_type {
  src:string,
  href?:string,
  className?:string,
}

class Advertisement extends Component<Props_type> {
  render() {
    const { src, href, className } = this.props
    return (
      <div className={`advertisement ${className}`}>
        <a className="ad-img-box" href={ href ? href : "/"}>
          <Image height={200} className="ad-img" src={src} preview={false}  />
        </a>
        <div className="ctrl-box">
          广告
        </div>
      </div>
    );
  }
}

export default Advertisement;